/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package trackmsg;

import base.TrackNode;

/**
 *
 * @author Tue
 */
public class TailMsg extends TrackCtrlMsg{
    private TrackNode toTrack;
    private String tail;
    private boolean keep;
    public TailMsg(TrackNode toTrack, String tail, boolean keep) {
        this.toTrack = toTrack;
        this.tail = tail;
        this.keep = keep;
    }

    public String getTail() {
        return tail;
    }

    public TrackNode getToTrack() {
        return toTrack;
    }

    public boolean isKeep() {
        return keep;
    }

    @Override
    public Type getType() {
        return Type.TAIL;
    }
    @Override
    public String toString() {
        return "MESSAGE: " + getType() + " " + getTail() +
                " " + getToTrack().getAddress();
    }
}
